package com.funny.mapper;

import com.funny.app.LocalTest;
import com.funny.encrypt.anno.ParamEncrypt;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @author fanxiao  2022/1/17
 * @since 1.0.0
 */
public interface LocalTestMapper {

	@Insert("insert local_test (name) values (#{name})")
	void insert(LocalTest localTest);

	@Select("select id, name from local_test where id = #{id}")
	LocalTest selectById(Long id);

	@Update("update local_test set name = #{name} where id = #{id}")
	void updateNameById(@ParamEncrypt @Param("name") String name, @Param("id") Long id);
}
